# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-arrow
_pyname=arrow
pkgver=0.15.8
pkgrel=0
pkgdesc="Python3 library to create and manipulate dates, times, and timestamps"
options="!check" # Requires unpackaged 'chai'
url="https://arrow.readthedocs.io/"
arch="noarch"
license="Apache-2.0"
depends="py3-dateutil"
makedepends="py3-setuptools"
checkdepends="py3-tz py3-simplejson py3-mock"
source="https://files.pythonhosted.org/packages/source/a/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver

replaces="py-arrow" # for backwards compatibility
provides="py-arrow=$pkgver-r$pkgrel" # for backwards compatibility

build() {
	python3 setup.py build
}

check() {
	# Requires unpackaged 'dateparser' module
	rm -f tests/factory_tests.py
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="93d161cbeb48636f2e3f91ebcc51cddbb3b21175ae31f5d9251a22358c7d1934663a8e47a82efd8773bf30c28efefcd8d2a3baf581fe191777cd41f12f29d4d2  arrow-0.15.8.tar.gz"
